package Xunhuan

import com.alibaba.fastjson.JSON
import com.alibaba.fastjson.JSONObject

fun main(){
//    test01()
//    test2()
//    test3()
//    test4()
//    test5()
    test6()
}
fun test01(){
    val array = arrayOf("a", "b", "c")
    for ((index,e) in array.withIndex()){
        println("$e")
    }
}


fun test2(){
    println(null.equals("111"))
}
fun test3(){
    println("111".equals(null))
}
fun test4(){
    val s:String
    println("111".equals("1"))
}


fun test5(){
    val str = "{\n" +
            "\t\"desc\": \"全校评价方案\",\n" +
            "\t\"jumpUrl\": \"https://%s/easicare-mobile/page/skill-certification/home-page\",\n" +
            "\t\"open\": true \n" +
            "}"
    val schoolEvaluationSchemeVo =
        JSONObject.parseObject(str, SchoolEvaluationScheme::class.java)

    println(schoolEvaluationSchemeVo)
}

fun test6(){
    val schoolEvaluationSchemeVo = SchoolEvaluationScheme().apply {
        this.desc= "全校评价方案"
        this.jumpUrl = "https://%s/easicare-mobile/page/skill-certification/home-page"
        this.open = true
    }
    println(JSON.toJSONString(schoolEvaluationSchemeVo))
}